@import 'vars/light';
@import 'vars/dark';
@import 'vars/care-light';
@import 'vars/care-dark';


.dark(@rule) {
    [data-weui-theme='dark'] & {
        @rule();
    }
}

.setColor(@var, @color) {
    .setColor(@var, @color, @color);
}

.setColor(@var, @light, @dark) {
    ._setColor({
        @{var}: @light;
    }, {
        @{var}: @dark;
    });
}
._setColor(@lightRule, @darkRule) {
    page,
    [data-weui-theme='light'] {
        @lightRule();
    }
    [data-weui-theme='dark'] {
        @darkRule();
    }
}

.care(@rule) {
    [data-weui-mode='care'] & {
        @rule();
    }
}
.setCareColor(@var, @color) {
    .setCareColor(@var, @color, @color);
}

.setCareColor(@var, @light, @dark) {
    ._setCareColor({
        @{var}: @light;
    }, {
        @{var}: @dark;
    });
}
._setCareColor(@lightRule, @darkRule) {
    page[data-weui-mode='care'],
    [data-weui-theme='light'][data-weui-mode='care'] {
        @lightRule();
    }
    [data-weui-theme='dark'][data-weui-mode='care'] {
        @darkRule();
    }
}
